In large workstation and mainframe computer systems, main memory is often accessed by multiple processors, as well as other devices such as Input/Output devices. All such devices that can modify memory contents will hereafter be called "devices". In this type of system, areas of memory are reserved, or allocated, for example by a device before data is stored into the area of memory. These areas of memory are often called "lines" since they often correspond to a line of cache memory that is attached to one of the processors. Thus, before a device writes to a line of main memory, the device will first reserve, or allocate, the line in main memory.
In the prior art, the device sends a request for ownership along with the address of the line that will be modified. The main memory then reserves, or allocates, the line of memory by assigning ownership of the line to the device requesting ownership. After assigning ownership, main memory sends the data contents of the line to the device that reserved the line. The device then accepts the data, modifies the data, and returns the new data to the main memory, which then stores the data into the line.
This method can be wasteful of bandwidth within the computer system, if the device requesting ownership of a line intends to replace the data contents of the line, regardless of the existing data contents of the line. This occurs, for example, when an I/O device reads data from a peripheral device and stores the data into the line of main memory. Since the I/O device will only write new data, and will discard any existing data contained in the line, it is wasteful of bandwidth to have the existing data from main memory sent to the I/O device, only to be discarded.
Another wasteful situation occurs when the line being requested by a first device has been previously allocated to a second device. When this occurs, the main memory must signal the second device to flush the data back to main memory, so that the first device can gain ownership of the line, and then the data is sent from the main memory to the first device.
There is a need in the art then for a method of reserving a data portion, or line, of main memory without first retrieving the data from the main memory. There is a further need in the art for a system that avoids flushing data when that data is to be overwritten. The present invention meets these and other needs in the art.